#pragma once

namespace net_tools::util
{
  template <bool>
  struct CompileTimeChecker
  {
    CompileTimeChecker(...);
  };
  template <>
  struct CompileTimeChecker<false>
  {
  };

} // namespace net_tools::util

#define STATIC_CHECK(expr, msg)                                         \
  {                                                                     \
    class ERROR_##msg                                                   \
    {                                                                   \
    };                                                                  \
    sizeof(net_tools::util::CompileTimeChecker<(expr)>(ERROR_##msg())); \
  }